package org.zjx.data.screen;

import org.zjx.command.entity.screen.Room;
import org.zjx.data.BaseSceneBuilder;

import java.awt.*;

public class TianJiChengSceneBuilder extends BaseSceneBuilder {

    @Override
    protected String getSceneName() {
        return "天机城";
    }

    @Override
    protected Dimension getSceneSize() {
        return new Dimension(165, 153);
    }

    @Override
    protected void addMonsters() {

    }

    @Override
    protected void addNpcs() {
        addNpc("小夫子", new Point(156, 83));
        addNpc("天机堂长老", new Point(134, 111));
        addNpc("万卷阁主", new Point(156, 83));
        addNpc("机枢馆主", new Point(70, 114));
    }

    @Override
    protected void addRooms() {
        Room tianJiTang = createRoom("天机堂", new Dimension(49, 19));
        addNpcToRoom(tianJiTang, "天机长老", new Point(24, 9));
        rooms.add(tianJiTang);

        Room wanJuanGe = createRoom("万卷阁", new Dimension(15, 8));
        addNpcToRoom(wanJuanGe, "万卷阁主", new Point(7, 4));
        rooms.add(wanJuanGe);

        Room jiShuGuan = createRoom("机枢馆", new Dimension(9, 9));
        addNpcToRoom(jiShuGuan, "机枢馆主", new Point(4, 4));
        rooms.add(jiShuGuan);
    }

    @Override
    protected void addTeleports() {
        addSceneTeleport(new Point(20, 15), "大唐境外", new Point(185, 8), new Point(24, 11));
        addSceneTeleport(new Point(156, 83), "万卷阁", new Point(15, 8), new Point(158, 84));
        addSceneTeleport(new Point(134, 111), "天机堂", new Point(49, 19), new Point(139, 115));
        addSceneTeleport(new Point(70, 114), "机枢馆", new Point(9, 9), new Point(76, 120));

        addRoomTeleport(new Point(156, 83), "万卷阁", new Point(15, 8), new Point(158, 84));
        addRoomTeleport(new Point(134, 111), "天机堂", new Point(49, 19), new Point(139, 115));
        addRoomTeleport(new Point(70, 114), "机枢馆", new Point(9, 9), new Point(76, 120));
    }

    public static void main(String[] args) {
        new TianJiChengSceneBuilder().execute("tianjicheng_scene.json", "天机城");
    }
}